package com.cg.design.graphicdesignpattern.strategy;

import java.util.Random;

/**
 * 表示随机出手势的策略类
 *
 * @program: LeetCode->RandomStrategy
 * @description: 表示随机出手势的策略类
 * @author: cg
 * @create: 2022-03-24 19:33
 **/
public class RandomStrategy implements Strategy {

    /**
     * 随机数生成器
     */
    private final Random random;

    public RandomStrategy(int seed) {
        random = new Random(seed);
    }

    @Override
    public Hand nextHand() {
        return Hand.getHand(random.nextInt(3));
    }

    @Override
    public void study(boolean win) {
    }
}
